/* WA */
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 7;
typedef long long ll;
ll n, x, a, y, b, k;
int p[N];
bool check(int len) {
  ll ans = 0;
  ll cX, cY, cXY;
  ll t = a / __gcd(a, b) * b;
  cXY = len / t;
  cX = len / a - cXY;
  cY = len / b - cXY;
  for (int i = 0; i < cXY; ++i) {
    ans += p[i] * (x + y);
  }
  for (int i = cXY; i < cXY + cX; ++i) {
    ans += p[i] * x;
  }
  for (int i = cXY + cX; i < cXY + cX + cY; ++i) {
    ans += p[i] * y;
  }
  return ans >= k;
}
int main() {
  // freopen("in.txt", "r", stdin);
  int q;
  cin >> q;
  while (q--) {
    cin >> n;
    for (int i = 0; i < n; ++i) {
      cin >> p[i];
      p[i] /= 100;
    }

    cin >> x >> a >> y >> b >> k;
    sort(p, p + n, greater<int>());
    if (x < y) {
      swap(x, y);
      swap(a, b);
    }

    int lo = 0, hi = n + 1, ans;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      if (check(mid)) {
        hi = mid - 1;
      } else {
        ans = mid;
        lo = mid + 1;
      }
    }
    if (lo > n) lo = -1;
    cout << lo << endl;
  }
}

/*

用下边这一组样例的时候，n的值被莫名改成了3！！！
这是因为cin遇到了3000000000这个一个超过int范围的数据

4
1
100
50 1
49 1
100
8
100 200 100 200 100 200 100 100
10 2
15 3
107
3
1000000000 1000000000 1000000000
50 1
50 1
3000000000
5
200 100 100 100 100
69 5
31 2
90



*/
